package com.xnyzc.lhy.didi.common.constants;

import com.xnyzc.lhy.common.penum.vehicle.ECallVehType;

public enum EXieChengCallVehType {

    AIRPORT_PICK_UP("airport-pickup", "接机"),
    AIRPORT_DROP_OFF("airport-dropoff", "送机"),
    STATION_PICK_UP("station-pickup", "接站"),
    STATION_DROP_OFF("station-dropoff", "送站");

    String code;
    String name;

    EXieChengCallVehType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static ECallVehType getByCode(String code) {
        switch (code) {
            case "airport-pickup": {
                return ECallVehType.meetAirport;
            }
            case "airport-dropoff": {
                return ECallVehType.deliveryAirport;
            }
            case "station-pickup": {
                return ECallVehType.meetStation;
            }
            case "station-dropoff": {
                return ECallVehType.deliveryStation;
            }
        }
        return null;
    }
}
